package com.tbit.uqbike.object.pojo.statistics;

import lombok.Data;

import java.util.Date;

/**
 * @Author HZW
 * @ClassName BrandDataMonthSta
 * @Description 品牌对账数据月统计
 * @date 2022/4/2 10:42
 * @Version 1.0
 */
@Data
public class AccountDataMonthSta {
    private Integer brandId;
    /**
     * 区域Id
     */
    private Integer accountId;
    /**
     * 订单日期
     */
    private String orderDate;
    /**
     * 添加时间
     */
    private Date addTime;
    /**
     * 订单类型，0为金额，1为订单
     */
    private Integer type;
    /**
     * 骑行订单支付
     */
    private Integer orderPayMoney;
    /**
     * 骑行收入
     */
    private Integer rideIncome;
    /**
     * 罚款收入
     */
    private Integer fineIncome;
    /**
     * 骑行订单退款
     */
    private Integer rideOrderRefund;
    /**
     * 骑行卡
     */
    private Integer rideCard;
    /**
     * 骑行卡订单退款
     */
    private Integer rideCardRefund;
    /**
     * 免押卡
     */
    private Integer depositCard;
    /**
     * 免押卡订单退款
     */
    private Integer depositCardRefund;
    /**
     * 会员卡
     */
    private Integer vipCard;
    /**
     * 会员卡订单退款
     */
    private Integer vipCardRefund;
    /**
     * 优惠券
     */
    private Integer couponOrder;
    /**
     * 优惠券订单退款
     */
    private Integer couponOrderRefund;
    /**
     * 区域名称
     */
    private String name;

    /**
     * 总数
     */
    private Integer total;

    public void setTotal(AccountDataMonthSta accountDataDaySta) {
        this.total = accountDataDaySta.getOrderPayMoney() + accountDataDaySta.getRideCard() +
                accountDataDaySta.getVipCard() + accountDataDaySta.getDepositCard() +
                accountDataDaySta.getCouponOrder()
                - accountDataDaySta.getRideOrderRefund() - accountDataDaySta.getRideCardRefund() -
                accountDataDaySta.getVipCardRefund() - accountDataDaySta.getDepositCardRefund()
                - accountDataDaySta.getCouponOrderRefund();
    }
}
